source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

# Our Libraries
def libraries
  pod 'Moya', :path => "../"
  pod 'Moya/ReactiveCocoa', :path => "../"
  pod 'Moya/RxSwift', :path => "../"
  pod 'Alamofire', "~> 4.0.0"
  pod 'RxSwift', '3.0.0-beta.1'
  pod 'RxCocoa', '3.0.0-beta.1'
  pod 'ReactiveSwift', '1.0.0-alpha.1'
end

# Test Libraries
def test_pods
  pod 'Quick', :git => "https://github.com/Quick/Quick", :branch => "swift-3.0"
  pod 'Nimble', :git => "https://github.com/Quick/Nimble", :branch => "master" 
  pod 'OHHTTPStubs'
end

target 'Demo' do
  platform :ios, '9.0'
  libraries
end

target 'MoyaTests-iOS' do
    platform :ios, '9.0'
    libraries
    test_pods
end

target 'MoyaTests-tvOS' do
    platform :tvos, '9.0'
    libraries
    test_pods
end

target 'MoyaTests-Mac' do
    platform :osx, '10.11'
    libraries
    test_pods
end

# Hack to fix testability until cocoapods gets an update
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.name == 'Debug'
        config.build_settings['ENABLE_TESTABILITY'] = 'YES'
        config.build_settings['SWIFT_VERSION'] = '3.0'
      end
    end
  end
end
